<script>
import NavigationBar from "../../components/navigationBar/navigationBar.vue";
import e from "../../res/www.a9a.cn";

var app = getApp();

export default {
  name: "materialLibrary",
  data() {
    return {
      index_so_flag: false, // 筛选框
      color: '',
      rgbcolor: '',
    }
  },
  components: {NavigationBar},
  onLoad() {
    var that = this;
    app.globalData.get_config('_ZEAI').then(function (a) {
      that.setData({
        color: app.globalData._ZEAI.color,
        rgbcolor: e.c16_rgb(app.globalData._ZEAI.color),
      });
    });
  },
  methods: {
    getList() {
      this.index_so_flag = true;
      // uni.request({
      //   url: 'https://test.youfenglove.com/api/index/getmsgcount',
      //   method: 'post',
      //   header: {'content-type': 'application/json'},
      //   success: function (a) {
      //     console.log('获取到的值', a)
      //   }
      // });
    },

    // 关闭筛选框
    index_so_closeFn: function () {
      var that = this;
      this.setData({
        index_so_mask_class: 'alpha100_0',
        index_so_box_class: 'div_leftAnm2',
        somoreclass: ''
      });
      setTimeout(function () {
        that.setData({
          index_so_flag: false
        });
      }, 400);
    },
    emptyFn: function () {
    },
  }
}
</script>

<template>
  <view class="materialLibrary">
    <navigationBar></navigationBar>
    <view class="materialLibraryBox" @tap="getList">
      <view class="flexHer">筛选条件</view>
      <view class="imgList">
        素材库
      </view>
    </view>
    <view v-if="index_so_flag" :class="'mask1 div_right_mask ' + index_so_mask_class"
          @tap.stop.prevent="index_so_closeFn">
      <view :class="'div_right_box ' + index_so_box_class" @tap.stop.prevent="emptyFn">
        <view class="filter">
          筛选图片
        </view>
      </view>
    </view>
  </view>
</template>

<style lang="scss" scoped>
@import "materialLibrary.scss";
</style>